<?php


namespace app;

use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use app\admin\model\AdminUser;
use app\admin\service\auth\RuleParser;
use Throwable;

class Test extends Command
{
    protected function configure()
    {
        $this->setName('Test')->setDescription('Say Hello');
    }

    protected function execute(Input $input, Output $output)
    {
        try{
            /** @var RuleParser $auth */
            $auth = app(RuleParser::class);
            $rule = $auth->ruleParse('app/1/delete/heh');
            var_dump($rule);
            var_dump($rule->check('/app/1/delete.html'));
        }catch(Throwable $e){
            echo $e;
        }

    }
}